/*-
 * Copyright (c) 2009-2010 David Forsythe.
 * See LICENSE file for license details.
 */

#ifndef __LIBPKG_REPOSITORY_H__
#define __LIBPKG_REPOSITORY_H__

/* For FILE * */
#include <stdio.h>

#include "pkg.h"

/* XXX: Init's for repository types. */
void pkg_repository_ftp_init(struct pkg_repository *);

struct pkg_repository *pkg_repository_create(void);

void pkg_repository_release(struct pkg_repository *);

int pkg_repository_open(struct pkg_repository *, const char *, u_int);

FILE *pkg_repository_fetch_pkg(struct pkg_repository *, const char *, char **,
        size_t *, u_int);

int pkg_repository_close(struct pkg_repository *);

#endif
